﻿#ifndef USERMANAGESTANDARDITEMMODEL_H
#define USERMANAGESTANDARDITEMMODEL_H

#include <QStandardItemModel>
#include "userrelation.h"

class UserManageStandardItemModel : public QStandardItemModel
{
    Q_OBJECT
public:
    explicit UserManageStandardItemModel(QObject *parent = nullptr);

    QStringList header;

    void setHeader(UserRelation::RelationType type);

    void insertUserRelation(UserRelation &relation);

    void insertUserRelation(QList<UserRelation*> relations, bool isShowPlatformUser);

    UserRelation* getUserRelation(int index);

    void reset();

signals:

public slots:

private:
    QList<UserRelation*> relations;
};

#endif // USERMANAGESTANDARDITEMMODEL_H
